package thread;

public class ThreadDemo3 {
    public static void main(String[] args) {
        //第一种方式:继承Thread重写run方法
        Thread t1 = new Thread() {
            public void run() {
                for (int i = 0; i < 100; i++) {
                    System.out.println("><");
                }
            }
        };
        Runnable r1 =new Runnable() {
            @Override
            public void run() {
                for (int i=0;i<1000;i++){
                    System.out.println(">?>");
                }
            }
        } ;
    }
}